#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <wbemidl.h>
#pragma comment(lib, "wbemuuid.lib")
#include <comutil.h>
#pragma comment(lib, "comsuppw.lib")

#include "common.h"

#ifndef _Wmi
#define _Wmi


class Wmi {
public:
	IWbemServices *pSvc;
	IWbemLocator *pLoc;
	HRESULT hr;
    HRESULT hres;

	// Constructor
	Wmi(void);
	// Destructor
	~Wmi(void);

	// Initialize COM.
	bool initialize(void);
	bool connect(void);
	bool connect(char* /*host*/, char* /*user*/, char* /*pass*/);
	bool setSecurity(void);

	int ping(char*);
};

#endif // _Wmi